package com.wynet.shopsapp.controller;


import com.wynet.shopsapp.dto.UserDetailDto;
import com.wynet.shopsapp.service.intf.UserDetailService;
import com.wynet.shopsapp.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/userdetail/")
@CrossOrigin
@Api(tags = "实现用户详情的相关操作")
public class UserDetailController {
    @Resource
    private UserDetailService service;

    @PostMapping("update.do")
    public R update(@RequestBody UserDetailDto dto){
        return service.update(dto);
    }
    @GetMapping("my.do")
    public R my(@RequestParam int uid){
        return service.queryMy(uid);
    }
}
